<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
    <script type="text/javascript">
        EvPNG.fix('div, ul, img, li, input, a');
    </script>
    <![endif]-->
    <script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
    <script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>

    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>

    <script type="text/javascript" src="js/select.js"></script>

    <script type="text/javascript" src="js/lrscroll.js"></script>

    <script type="text/javascript" src="js/iban.js"></script>
    <script type="text/javascript" src="js/fban.js"></script>
    <script type="text/javascript" src="js/f_ban.js"></script>
    <script type="text/javascript" src="js/mban.js"></script>
    <script type="text/javascript" src="js/bban.js"></script>
    <script type="text/javascript" src="js/hban.js"></script>
    <script type="text/javascript" src="js/tban.js"></script>
    <script type="text/javascript" src="js/lrscroll_1.js"></script>
    <script type="text/javascript" src="js/vue.min.js"></script>
    <script type="text/javascript" src="js/axios.min.js"></script>
    <title>尤洪</title>
</head>
<body>
<!--Begin Header Begin-->
<div id="head">
    <div class="soubg">
        <div class="sou">
            <!--Begin 所在收货地区 Begin-->
            <span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0"
                               cellpadding="0">
                          <tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
            <!--End 所在收货地区 End-->
            <span class="fr">
        	<span class="fl" v-show="loginUser===''">你好，请<a href="Login.html">登录</a>&nbsp;
                <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp;|&nbsp;
            </span>
            <span class="fl" v-show="loginUser!==''">
                 <a href="Member_Order.html">我的订单</a>&nbsp;|
                 <a href="Member_UserInfo.html">后台</a>&nbsp;|
                 <a href="JavaScript:void(0)" @click="logout">注销</a>&nbsp;|
            </span>
        	<span class="ss">
            	<div class="ss_list">
                	<a href="#">收藏夹</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">我的收藏夹</a></li>
                                <li><a href="#">我的收藏夹</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="ss_list">
                	<a href="#">客户服务</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="ss_list">
                	<a href="#">网站导航</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">网站导航</a></li>
                                <li><a href="#">网站导航</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="images/s_tel.png" align="absmiddle"/></a></span>
        </span>
        </div>
    </div>
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="images/logo.png"/></a></div>
        <div class="search">
            <form>
                <input type="text" v-model="name" class="s_ipt"/>
                <input type="button" value="搜索" class="s_btn" @click="searchByName"/>
            </form>
        </div>
        <div class="i_car">
            <div class="car_t">购物车 <span>[{{carList.length}}]</span></div>
            <div class="car_bg">
                <!--Begin 购物车未登录 Begin-->
                <div class="un_login" v-show="loginUser===''">还未登录！<a href="Login.html" style="color:#ff4e00;">马上登录</a>
                    查看购物车！
                </div>
                <!--End 购物车未登录 End-->
                <!--Begin 购物车已登录 Begin-->
                <div v-show="loginUser!==''" v-if="carList.length>0">
                    <ul class="cars">
                        <li v-for="car in carList">
                            <div class="img"><a href="#"><img :src="'http://192.168.189.129:8091/'+car.pImage"
                                                              width="58" height="58"/></a></div>
                            <div class="name"><a href="#">{{car.pName}}</a></div>
                            <div class="price"><font color="#ff4e00">￥{{parseFloat(car.pPrice).toFixed(2)}}</font>
                                X{{car.pCount}}
                            </div>
                        </li>
                    </ul>
                    <div class="price_sum">共计&nbsp; <font color="#ff4e00">￥</font><span>{{allPrice}}</span></div>
                    <div class="price_a"><a href="BuyCar.html">去购物车结算</a></div>
                </div>
                <div v-if="carList.length===0" style="text-align: center">
                    购物车暂未商品
                </div>
                <!--End 购物车已登录 End-->
            </div>
        </div>
    </div>
</div>
<!--End Header End-->

<!--Begin Menu Begin-->
<div class="menu_bg">
    <div class="menu">
        <!--Begin 商品分类详情 Begin-->
        <div class="nav">
            <div class="nav_t">全部商品分类</div>
            <div class="leftNav">
                <ul>
                    <li v-for="(navOne,index) in loadNav1" @mouseover="loadNavTwo(navOne.id)">
                        <div class="fj">
                            <span class="n_img"><span></span><img :src="image+(index+1)+'.png'"/></span>
                            <span class="fl">{{navOne.name}}</span>
                        </div>
                        <div class="zj">
                            <div class="zj_l">
                                <div class="zj_l_c" v-for="navTwo in loadNav2">
                                    <h2><a :href="'CategoryList.html?type=id&id='+navTwo.id">{{navTwo.name}}</a></h2>
                                    <a :href="'CategoryList.html?type=id&id='+navThree.id"
                                       v-for="navThree in navTwo.productCategory3">{{navThree.name}}</a>
                                </div>
                            </div>
                            <div class="zj_r">
                                <a href="#"><img src="images/n_img1.jpg" width="236" height="200"/></a>
                                <a href="#"><img src="images/n_img2.jpg" width="236" height="200"/></a>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <!--End 商品分类详情 End-->
        <ul class="menu_r">
            <li><a href="Index.html">首页</a></li>
            <li v-for="navOne in loadNav1"><a :href="'CategoryList.html?type=id&id='+navOne.id">{{navOne.name}}</a></li>
        </ul>
        <div class="m_ad">中秋送好礼！</div>
    </div>
</div>
<!--End Menu End-->
<!--完成7.1-->

<div class="i_bg bg_color">
    <!--轮播图-->
    <div class="i_ban_bg">
        <!--Begin Banner Begin-->
        <div class="banner">
            <div class="top_slide_wrap">
                <ul class="slide_box bxslider">
                    <li><img src="images/ban1.jpg" width="740" height="401"/></li>
                    <li><img src="images/ban1.jpg" width="740" height="401"/></li>
                    <li><img src="images/ban1.jpg" width="740" height="401"/></li>
                </ul>
                <div class="op_btns clearfix">
                    <a href="#" class="op_btn op_prev"><span></span></a>
                    <a href="#" class="op_btn op_next"><span></span></a>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            //var jq = jQuery.noConflict();
            (function () {
                $(".bxslider").bxSlider({
                    auto: true,
                    prevSelector: jq(".top_slide_wrap .op_prev")[0], nextSelector: jq(".top_slide_wrap .op_next")[0]
                });
            })();
        </script>
        <!--End Banner End-->
        <div class="inews">
            <div class="news_t">
                <span class="fr"><a href="Member_NewsManage.html">更多 ></a></span>新闻资讯
            </div>
            <ul id="newsList">
                <li v-for="news in newsList">
                    <a :href="'Member_NewsShow.html?id='+news.id">{{news.title}}</a>
                </li>
            </ul>
            <div class="charge_t">
                话费充值
                <div class="ch_t_icon"></div>
            </div>
            <form>
                <table border="0" style="width:205px; margin-top:10px;" cellspacing="0" cellpadding="0">
                    <tr height="35">
                        <td width="33">号码</td>
                        <td><input type="text" v-model="number" class="c_ipt"/></td>
                    </tr>
                    <tr height="35">
                        <td>面值</td>
                        <td>
                            <select class="jj" name="city">
                                <option value="0" selected="selected">100元</option>
                                <option value="1">50元</option>
                                <option value="2">30元</option>
                                <option value="3">20元</option>
                                <option value="4">10元</option>
                            </select>
                            <span style="color:#ff4e00; font-size:14px;">￥99.5</span>
                        </td>
                    </tr>
                    <tr height="35">
                        <td colspan="2"><input type="submit" value="立即充值" class="c_btn" @click="phoneBill($event)"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>

    <!--Begin 热门商品 Begin-->
    <div class="content mar_10">
        <div class="h_l_img">
            <div class="img"><img src="images/l_img.jpg" width="188" height="188"/></div>
            <div class="pri_bg">
                <span class="price fl">￥53.00</span>
                <span class="fr">16R</span>
            </div>
        </div>
        <div class="hot_pro">
            <div id="featureContainer">
                <div id="feature">
                    <div id="block">
                        <div id="botton-scroll">
                            <ul class="featureUL">
                                <li class="featureBox">
                                    <div class="box">
                                        <div class="h_icon"><img src="images/hot.png" width="50" height="50"/></div>
                                        <div class="imgbg">
                                            <a href="#"><img src="images/hot1.jpg" width="160" height="136"/></a>
                                        </div>
                                        <div class="name">
                                            <a href="#">
                                                <h2>德国进口</h2>
                                                德亚全脂纯牛奶200ml*48盒
                                            </a>
                                        </div>
                                        <div class="price">
                                            <font>￥<span>189</span></font> &nbsp; 26R
                                        </div>
                                    </div>
                                </li>
                                <li class="featureBox">
                                    <div class="box">
                                        <div class="h_icon"><img src="images/hot.png" width="50" height="50"/></div>
                                        <div class="imgbg">
                                            <a href="#"><img src="images/hot2.jpg" width="160" height="136"/></a>
                                        </div>
                                        <div class="name">
                                            <a href="#">
                                                <h2>iphone 6S</h2>
                                                Apple/苹果 iPhone 6s Plus公开版
                                            </a>
                                        </div>
                                        <div class="price">
                                            <font>￥<span>5288</span></font> &nbsp; 25R
                                        </div>
                                    </div>
                                </li>
                                <li class="featureBox">
                                    <div class="box">
                                        <div class="h_icon"><img src="images/hot.png" width="50" height="50"/></div>
                                        <div class="imgbg">
                                            <a href="#"><img src="images/hot3.jpg" width="160" height="136"/></a>
                                        </div>
                                        <div class="name">
                                            <a href="#">
                                                <h2>倩碧特惠组合套装</h2>
                                                倩碧补水组合套装8折促销
                                            </a>
                                        </div>
                                        <div class="price">
                                            <font>￥<span>368</span></font> &nbsp; 18R
                                        </div>
                                    </div>
                                </li>
                                <li class="featureBox">
                                    <div class="box">
                                        <div class="h_icon"><img src="images/hot.png" width="50" height="50"/></div>
                                        <div class="imgbg">
                                            <a href="#"><img src="images/hot4.jpg" width="160" height="136"/></a>
                                        </div>
                                        <div class="name">
                                            <a href="#">
                                                <h2>品利特级橄榄油</h2>
                                                750ml*4瓶装组合 西班牙原装进口
                                            </a>
                                        </div>
                                        <div class="price">
                                            <font>￥<span>280</span></font> &nbsp; 30R
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <a class="h_prev" href="javascript:void(0);">Previous</a>
                    <a class="h_next" href="javascript:void(0);">Next</a>
                </div>
            </div>
        </div>
    </div>

    <!--循环商品-->
    <div id="main">
        <div v-for="(goods,index) in listGoods">
            <div class="content mar_20" v-show="index%3===0">
                <img src="images/mban_1.jpg" width="1200" height="110"/>
            </div>
            <div v-if="goods.productList.length>0">
                <div class="i_t mar_10">
                    <span class="floor_num">{{index + 1}}F</span>
                    <span class="fl">{{goods.name}}</span>
                    <span class="i_mores fr">
                </span>
                </div>
                <div class="content">
                    <div class="fresh_left">
                        <div class="fre_ban">
                            <div id="imgPlay1">
                                <ul class="imgs">
                                    <li><a href="#"><img :src="gsImg+(index+1)+'.jpg'" width="211" height="286"/></a>
                                    </li>
                                    <li><a href="#"><img :src="gsImg+(index+1)+'.jpg'" width="211" height="286"/></a>
                                    </li>
                                    <li><a href="#"><img :src="gsImg+(index+1)+'.jpg'" width="211" height="286"/></a>
                                    </li>
                                </ul>
                                <div class="prevf">上一张</div>
                                <div class="nextf">下一张</div>
                            </div>
                        </div>
                        <div class="fresh_txt">
                            <div class="fresh_txt_c">
                                <a :href="'CategoryList.html?type=id&id='+pList.id"
                                   v-for="pList in goods.productCategory2List">{{pList.name}}&nbsp; &nbsp; &nbsp;</a>
                            </div>
                        </div>
                    </div>
                    <div class="fresh_mid">
                        <ul>
                            <li v-for="product in goods.productList">
                                <div class="name"><a href="#" @click="toGoodOne(product.id)">{{product.name}}</a></div>
                                <div class="price">
                                    <font>￥<span>{{parseFloat(product.price).toFixed(2)}}</span></font>
                                </div>
                                <div class="img"><a href="#"><img :src="'http://192.168.189.129:8091/'+product.fileName"
                                                                  width="185"
                                                                  height="155"/></a>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="fresh_right">
                        <ul>
                            <li><a href="#"><img src="images/fre_b1.jpg" width="260" height="220"/></a></li>
                            <li><a href="#"><img src="images/fre_b2.jpg" width="260" height="220"/></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--Begin 猜你喜欢 Begin-->
    <div class="i_t mar_10">
        <span class="fl">猜你喜欢</span>
    </div>
    <div class="like">
        <div id="featureContainer1">
            <div id="feature1">
                <div id="block1">
                    <div id="botton-scroll1">
                        <ul class="featureUL">
                            <li class="featureBox">
                                <div class="box">
                                    <div class="imgbg">
                                        <a href="#"><img src="images/hot1.jpg" width="160" height="136"/></a>
                                    </div>
                                    <div class="name">
                                        <a href="#">
                                            <h2>德国进口</h2>
                                            德亚全脂纯牛奶200ml*48盒
                                        </a>
                                    </div>
                                    <div class="price">
                                        <font>￥<span>189</span></font> &nbsp; 26R
                                    </div>
                                </div>
                            </li>
                            <li class="featureBox">
                                <div class="box">
                                    <div class="imgbg">
                                        <a href="#"><img src="images/hot2.jpg" width="160" height="136"/></a>
                                    </div>
                                    <div class="name">
                                        <a href="#">
                                            <h2>iphone 6S</h2>
                                            Apple/苹果 iPhone 6s Plus公开版
                                        </a>
                                    </div>
                                    <div class="price">
                                        <font>￥<span>5288</span></font> &nbsp; 25R
                                    </div>
                                </div>
                            </li>
                            <li class="featureBox">
                                <div class="box">
                                    <div class="imgbg">
                                        <a href="#"><img src="images/hot3.jpg" width="160" height="136"/></a>
                                    </div>
                                    <div class="name">
                                        <a href="#">
                                            <h2>倩碧特惠组合套装</h2>
                                            倩碧补水组合套装8折促销
                                        </a>
                                    </div>
                                    <div class="price">
                                        <font>￥<span>368</span></font> &nbsp; 18R
                                    </div>
                                </div>
                            </li>
                            <li class="featureBox">
                                <div class="box">
                                    <div class="imgbg">
                                        <a href="#"><img src="images/hot4.jpg" width="160" height="136"/></a>
                                    </div>
                                    <div class="name">
                                        <a href="#">
                                            <h2>品利特级橄榄油</h2>
                                            750ml*4瓶装组合 西班牙原装进口
                                        </a>
                                    </div>
                                    <div class="price">
                                        <font>￥<span>280</span></font> &nbsp; 30R
                                    </div>
                                </div>
                            </li>
                            <li class="featureBox">
                                <div class="box">
                                    <div class="imgbg">
                                        <a href="#"><img src="images/hot4.jpg" width="160" height="136"/></a>
                                    </div>
                                    <div class="name">
                                        <a href="#">
                                            <h2>品利特级橄榄油</h2>
                                            750ml*4瓶装组合 西班牙原装进口
                                        </a>
                                    </div>
                                    <div class="price">
                                        <font>￥<span>280</span></font> &nbsp; 30R
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <a class="l_prev" href="javascript:void(0);">Previous</a>
                <a class="l_next" href="javascript:void(0);">Next</a>
            </div>
        </div>
    </div>
    <!--End 猜你喜欢 End-->

    <!--Begin Footer Begin -->
    <div class="b_btm_bg b_btm_c">
        <div class="b_btm">
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                   cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="images/b1.png" width="62" height="62"/></td>
                    <td><h2>正品保障</h2>正品行货 放心购买</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                   cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="images/b2.png" width="62" height="62"/></td>
                    <td><h2>满38包邮</h2>满38包邮 免运费</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                   cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="images/b3.png" width="62" height="62"/></td>
                    <td><h2>天天低价</h2>天天低价 畅选无忧</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                   cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="images/b4.png" width="62" height="62"/></td>
                    <td><h2>准时送达</h2>收货时间由你做主</td>
                </tr>
            </table>
        </div>
    </div>
    <div class="b_nav">
        <dl>
            <dt><a href="#">新手上路</a></dt>
            <dd><a href="#">售后流程</a></dd>
            <dd><a href="#">购物流程</a></dd>
            <dd><a href="#">订购方式</a></dd>
            <dd><a href="#">隐私声明</a></dd>
            <dd><a href="#">推荐分享说明</a></dd>
        </dl>
        <dl>
            <dt><a href="#">配送与支付</a></dt>
            <dd><a href="#">货到付款区域</a></dd>
            <dd><a href="#">配送支付查询</a></dd>
            <dd><a href="#">支付方式说明</a></dd>
        </dl>
        <dl>
            <dt><a href="#">会员中心</a></dt>
            <dd><a href="#">资金管理</a></dd>
            <dd><a href="#">我的收藏</a></dd>
            <dd><a href="#">我的订单</a></dd>
        </dl>
        <dl>
            <dt><a href="#">服务保证</a></dt>
            <dd><a href="#">退换货原则</a></dd>
            <dd><a href="#">售后服务保证</a></dd>
            <dd><a href="#">产品质量保证</a></dd>
        </dl>
        <dl>
            <dt><a href="#">联系我们</a></dt>
            <dd><a href="#">网站故障报告</a></dd>
            <dd><a href="#">购物咨询</a></dd>
            <dd><a href="#">投诉与建议</a></dd>
        </dl>
        <div class="b_tel_bg">
            <a href="#" class="b_sh1">新浪微博</a>
            <a href="#" class="b_sh2">腾讯微博</a>
            <p>
                服务热线：<br/>
                <span>400-123-4567</span>
            </p>
        </div>
        <div class="b_er">
            <div class="b_er_c"><img src="images/er.gif" width="118" height="118"/></div>
            <img src="images/ss.png"/>
        </div>
    </div>
    <div class="btmbg">
        <div class="btm">
            备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 ,
            Technical Support: Dgg Group <br/>
            <img src="images/b_1.gif" width="98" height="33"/><img src="images/b_2.gif" width="98" height="33"/><img
                src="images/b_3.gif" width="98" height="33"/><img src="images/b_4.gif" width="98" height="33"/><img
                src="images/b_5.gif" width="98" height="33"/><img src="images/b_6.gif" width="98" height="33"/>
        </div>
    </div>
    <!--End Footer End -->
</div>


<script type="text/javascript">

    new Vue({
        el: ".menu",
        data: {
            image: "images/nav",
            zjShow: false,
            loadNav1: '',
            loadNav2: '',
        },
        created() {
            this.loadNavOne();
        },
        methods: {
            loadNavOne: function () {
                axios("index/loadNavOne").then(res => {
                    this.loadNav1 = res.data;
                })
            },
            loadNavTwo: function (id) {
                this.zjShow = !this.zjShow;
                axios("index/loadNavTwo/" + id).then(res => {
                    this.loadNav2 = res.data;
                })
            }
        }
    })

    new Vue({
        el: ".inews",
        data: {
            newsList: "",
            number: "",
        }, created() {
            this.load_new();
        },
        methods: {
            load_new: function () {
                axios("index/loadNews").then(res => {
                    this.newsList = res.data;
                })
            },
            checkNumber() {
                if (this.number === '') {
                    alert("不能为空");
                    return false;
                } else {
                    if (/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/.test(this.number)) {
                        return true;
                    } else {
                        alert("电话格式不正确！");
                        return false;
                    }
                }
            },
            phoneBill(e) {
                if (this.checkNumber()) {
                    alert("yes")
                } else {
                    return e.preventDefault();
                }
            }
        }
    })

    new Vue({
        el: "#main",
        data: {
            goodImg: "images/upload/",
            gsImg: "images/goods",
            listGoods: "",
        },
        created() {
            this.loadGood();
        },
        methods: {
            loadGood() {
                axios("index/loadGoods").then(res => {
                    this.listGoods = res.data;
                })
            },
            toGoodOne(id) {
                window.location.href = "Product.html?id=" + id;
            }
        }
    })

    new Vue({
        el: "#head",
        data: {
            loginUser: "",
            name: "",
            carList: "",
            allPrice: "",
        },
        created() {
            this.getUser();
        },
        methods: {
            getUser() {
                axios("index/getUser").then(res => {
                    this.loginUser = res.data;
                    if (this.loginUser !== "") {
                        this.loadCarList();
                    }
                })
            },
            logout() {
                axios("index/logout").then(res => {
                    this.getUser();
                    alert("退出成功！");
                })
            },
            searchByName() {
                window.location.href = "CategoryList.html?type=str&name=" + this.name;
            },
            loadCarList() {
                axios("car/loadCarList/" + this.loginUser.id).then(res => {
                    this.carList = res.data;
                    this.allPrice = 0;
                    for (const car of this.carList) {
                        this.allPrice += parseFloat(car.pPrice) * parseFloat(car.pCount);
                    }
                    this.allPrice = parseFloat(this.allPrice).toFixed(2)
                })
            }
        }
    })

</script>
</body>
<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
